import { createRouter, createWebHistory } from 'vue-router'
import HomePage from '../views/HomePage.vue'
import DefaultLayout from '@/layout/DefaultLayout.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: DefaultLayout,
      children: [
        {
          path: '',
          name: 'home-page',
          component: HomePage,
        }, {
          path: 'about',
          name: 'about-page',
          component: () => import('../views/AboutPage.vue'),
        }
      ]
    },
    {
      path: '/three',
      name: 'three-page',
      component: () => import('../views/ThreePage.vue')
    }
  ]
})

export default router
